package route

import (
	"github.com/gin-gonic/gin"
	"kpt-dtm/http/api"
	"kpt-dtm/http/debug"
)

func DebugAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
	return func(s *gin.Engine) {
		for _, opt := range opts {
			opt(s)
		}

		// Not Found
		s.NoRoute(api.Handle404)
		debugRoute := authRouteGroup(s, "/api/v1/kpt/debug/")
		// kpt debug api
		debugRoute.GET("hello", debug.HelloOk)
	}

}
